function doSubmit() {

	form = document.theform;
	
	if(!validateForm(form))
		return;
	
	var loginId=$F('loginId');
	var passQuestion=$F('passQuestion');
	var passAnswer=$F('passAnswer');	
	
    buffalo.remoteCall("userServiceAjaxService.findPass",[loginId,passQuestion,passAnswer], function(reply) {
        ajaxSubmit(reply.getResult(),"密码已发送！");
    });	
		
}

function validateForm(form){
	if (form.loginId.value.length == 0) {
		sl_alert("请输入您的用户名！");
		form.loginId.focus();
		return false;
	}
	if (!/^([a-zA-z_]{1})([\w]*)$/g.test(form.loginId.value)){
			sl_alert("'用户名'只可包含字母、数字或下划线，且开头的只能是字母或下划线！");
			form.loginId.focus();
			form.loginId.select();
			return false;
	}	
	if (form.loginId.value.length < 3) {
		sl_alert("用户名应大于3个小于15个字符！");
		form.loginId.focus();
		return false;
	}
	if (form.loginId.value.length > 30) {
		sl_alert("用户名应大于3个,小于15个字符！");
		form.loginId.focus();
		return false;
	}
	if(!sl_check(form.passQuestion,"密码提示问题",100,1)) return false;
	if(!sl_check(form.passAnswer,"密码提示答案",100,1)) return false;
	
	return true;
}
